package com.dog.basics.api.controller.mtkj;


import com.dog.basics.bean.dto.api.mtkj.ApiBankAccountAddDto;
import com.dog.basics.bean.dto.api.mtkj.ApiCashWithdrawalAddDto;
import com.dog.basics.common.constant.SwaggerConstants;
import com.dog.basics.common.util.R;
import com.dog.basics.service.mtkj.IMtBankAccountService;
import com.dog.basics.service.mtkj.IMtCashWithdrawalService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * <p>
 * 提现记录 前端控制器
 * </p>
 *
 * @author wph
 * @since 2020-11-09
 */
@RestController
@Api(value = "商户提现", tags = SwaggerConstants.API_ALL)
@RequestMapping("api/cash/withdrawal")
@AllArgsConstructor
public class MtCashWithdrawalController {
    private final IMtCashWithdrawalService mtCashWithdrawalService;
    /**
     * @Description: 新增提现记录
     * @Param: BankAccountAddDto
     * @return: Boolean
     * @Author: wph
     * @Date: 2020/3/27 0027
     */
    @PostMapping
    @ApiOperation(value = "新增提现记录", notes = "新增提现记录", tags = SwaggerConstants.API_SHOPPINGMONEY)
    public R<Boolean> saveObj(@Valid @RequestBody ApiCashWithdrawalAddDto obj) {
        return R.ok(mtCashWithdrawalService.saveObj(obj));
    }
}
